package com.probox.common.entity.mapper.customer;

import com.probox.common.entity.domain.system.SysDictData;
import com.probox.customer.api.domain.CustomerLevel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.probox.common.entity.vo.customer.CustomerLeveListlVo;
import com.probox.common.entity.vo.customer.CustomerLevelVo;
import com.probox.customer.api.domain.CustomerLevelOpenVo;
import com.probox.customer.api.domain.CustomerPrivilegeOpenVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 客户等级Mapper接口
 *
 * @author zsy
 * @date 2021-05-27
 */
public interface CustomerLevelMapper extends BaseMapper<CustomerLevel> {

    /**
     * 获取可以选择的等级
     *
     * @param levelId
     * @return
     */
    List<SysDictData> getLevel(@Param("levelId") Long levelId);

    List<CustomerLeveListlVo> getLevelInfoList(@Param("customerLevelVo") CustomerLeveListlVo customerLevelVo, @Param("PlatformUid") Long PlatformUid, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    Long getLevelInfoListCount(@Param("PlatformUid") Long PlatformUid);

    List<CustomerLeveListlVo> getPayLevelInfoList(@Param("customerLevelVo") CustomerLeveListlVo customerLevelVo, @Param("PlatformUid") Long PlatformUid, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    Long getPayLevelInfoListCount(@Param("PlatformUid") Long PlatformUid);

    CustomerLevelVo getlevelInfoDetail(@Param("levelId") Long levelId, @Param("PlatformUid") Long PlatformUid);

    CustomerLevelVo getlevelInfoDetailOpen(@Param("levelId") Long levelId, @Param("PlatformUid") Long PlatformUid);

    CustomerLevelVo getLevelPrivilegeInfo(@Param("levelId") Long levelId, @Param("PlatformUid") Long PlatformUid);

    List<CustomerLevelOpenVo> selectCustomerLevelPrivilegeInfo(Long customerPlatformUid);

    //根据等级id查询等级权益信息
    CustomerLevelOpenVo selectByIdCustomerLevelPrivilegeInfo(@Param("levelId") Long levelId);

    List<CustomerPrivilegeOpenVo> selectLevelAndRightsByUserId(@Param("customerUid") Long customerUid);

    List<CustomerLevel> selectCustomerLevelAndRight(@Param("customerUid") Long customerUid);

}
